

module.exports = function (data, msg) {
  var req = this.req;
  var res = this.res;
  var sails = req._sails;

  sails.log.silly('res.ok() :: Sending 200 ("OK") response');

  // Set status code
  res.status(200);

  var json = {
    code: 200,
    msg: msg,
    data: data
  }

  return res.jsonx(json);
}
